﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="CajaListGrid.ascx.cs"
 Inherits="UILGestion.Admin.CajaChica.CajaListGrid" %>
<%@ Register Assembly="CustomControls" Namespace="CustomControls" TagPrefix="cc1" %>
<script src="../Scripts/controlGrid.js" type="text/javascript"></script>



<table >
<tr>
<td width="400px">

    
<asp:DataPager ID="pager" PagedControlID="cajaListView" runat="server" >
    <Fields>
      <cc1:PagerField NextPageImageUrl="~/Images/arrow_right2.gif" 
      PreviousPageImageUrl="~/images/arrow_left.gif" />
    </Fields>
</asp:DataPager>

</td>

<td align="right" width="150px">
   
    
     <asp:LinkButton  runat= "server"      ForeColor="Blue"
         Text="ACTUALIZAR"
         Target="_self"  ID="addHyperlink2" onclick="addHyperlink2_Click"
         
                />
   
</td>



<td align="right"  width="150px">
    
    
     <asp:LinkButton  runat= "server"      ForeColor="Blue"
         Text="NUEVA CAJA"
         ToolTip="Permite crear una nueva Caja Chica para la Obra"       
                 Target="_self"  ID="addHyperlink1"
                PostBackUrl="~/Admin/CajaChica/CajaEditForm.aspx?type=A" 
                />
   
</td>



<td align="right">
    
    
     &nbsp;</td>

</tr>
</table>






<asp:ListView ID="cajaListView" runat="server" OnDataBound="ListView1_DataBound" 
    DataKeyNames="idInternal" onitemdatabound="ListView1_ItemDataBound">
    <LayoutTemplate>
        <table id="itemPlaceHolderContainer"   border="0"   runat="server"  >
            
            <tr id="Tr1" runat="server" class="ms-crm-List-Header" >
            
                
                <th id="Th7" runat="server">
                    <asp:LinkButton ID="LinkButton5" CommandName="Sort" CommandArgument="descripcion" ForeColor="Blue" runat="server">DESCRIPCION</asp:LinkButton>
                    </th>
                <th id="Th3" runat="server">
                    <asp:LinkButton ID="lb3" CommandName="Sort" CommandArgument="custodioStr" ForeColor="Blue" runat="server">CUSTODIO</asp:LinkButton>
                </th>
                <th id="Th1" runat="server">
                    <asp:LinkButton ID="LinkButton3" CommandName="Sort" CommandArgument="monedaStr" ForeColor="Blue" runat="server">MONEDA</asp:LinkButton>
                </th>
                <th id="Th2" runat="server">
                    <asp:LinkButton ID="LinkButton1" CommandName="Sort" CommandArgument="montoAsigando" ForeColor="Blue" runat="server">MONTO ASIGNADO</asp:LinkButton>
                </th>
                <th id="Th4" runat="server">
                    <asp:LinkButton ID="LinkButton2"  CommandName="Sort" CommandArgument="obraStr"  ForeColor="Blue" runat="server">OBRA</asp:LinkButton>
                </th>
                     

            </tr>
            <tr id="itemPlaceholder" runat="server">
            </tr>
        </table>
    </LayoutTemplate>
    <ItemTemplate>
        <tr  style='border-color:Silver;background-color: <%# (Container.DataItemIndex % 2 == 0)?"#fff":"#eee" %>'>
            <td width="225px">
                
                <asp:Hyperlink runat= "server"  ForeColor="Blue"
                Text='<%# DataBinder.Eval(Container.DataItem,"descripcion").ToString()%>'  
                 Target="_self"  ID="Comparativo"
                NavigateUrl='<%# "~/Admin/CajaChica/CajaReadForm.aspx?id=" + DataBinder.Eval (Container.DataItem,"idinternal").ToString() %>' 
               />   
                
                

            </td>
            <td width="250px">
                <%# Eval("CustodioStr")%><br />
            </td>
           
           <td width="100px" align="right">
                <%# Eval("monedaStr")%><br />
            </td>
             <td width="100px" align="right">
                <%# Eval("montoStr")%><br />
            </td>
            <td width="350px">
                <%# Eval("obraStr")%><br />
            </td>
           
        </tr>
    </ItemTemplate>
    <EmptyDataTemplate>
        <table id="Table1" runat="server" style="">
            <tr>
                <td>
                     <h2 style="font-size: x-small; color: #960818">
                        No existe Informacion.</h2>
                </td>
            </tr>
        </table>
    </EmptyDataTemplate>
</asp:ListView>


    
     